package com.woniuxy.custom.service.impl;

import com.woniuxy.comments.entity.Custom;
import com.woniuxy.comments.util.ResponseResult;
import com.woniuxy.comments.util.ResponseState;
import com.woniuxy.custom.mapper.CustomMapper;
import com.woniuxy.custom.service.CustomService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author Liu Tao
 * @Date 2023 05 15 19 20
 **/
@Service
public class CustomServiceImpl implements CustomService {
    @Resource
    private CustomMapper customMapper;

    @Override
    public ResponseResult<List<Custom>> findAll() {

        return new ResponseResult<List<Custom>>()
                .setCode(200)
                .setState(ResponseState.SELECT_SUCCESS)
                .setMessage("查询成功！")
                .setData(customMapper.findAll());
    }
}
